Week 11

Week 11: Interface and Application Programming

November 24 - December 1


[0] Overview
For the final project, it would be really nice to have a user interface someone could access digitally, instead of just having to do it through manual buttons.
This week's assignments:
(1.) Write an application that interfaces a user with an input /or output device that you made

[1] Connecting
The output device that I will be going with is actually through I2C, and that would be the ATTINY 1614 from an ESP32. Using the ESP32, I can build an interface through HTML that can connect by wifi. With great examples such as those from https://randomnerdtutorials.com/esp32-web-server-arduino-ide/, I was able to modify their code to work for an even better use case than LEDs - stepper motors! I needed a way to control them with ease, and this was able to do that. The ESP32 that I made two weeks ago has come very handy for these last few assignemnts! It may be my favorite chip out of all of them.



The major changes I did for the code was incorporate the Wire elements to initiate the SCL and SDA lines. Once that was taken care of, I then began transmitting data to the local device, which I did through Wire.beginTransmission(1); Wire.write(1); Wire.endTransmission();

I had some initial issues interfacing them together, but I found out that I needed a resistor between them and pulled up to VCC, which solved the issue for the short term.

To connect the ESP32 to the web server, I first had to connect both devices to my hotspot, which was used through my hotspot. Nathan showed us a better way throguh class with the FireBase server for free, but it ended up constantly making my ESP32 attempt to connect to FireBase even when it was turned off for some reason. Once both were on my hotspot, I was greeted by this message:



Great! Now onto the interface, we are presented with the two motor options, and once I click on it, it works!!!! This was a satisfying but short week, and I've been spending that time towards getting the right materials to the final project as well as designing the final CAD parts needed before the printers get all used up



Yes, it's a short video. However! This is massive progress for my final project, which ties significantly with I2C and this interface.